															
N0000	(Program Start--Mechanical set up comments at end)														
N0010	(Program purpose: Drilling routine for a number of holes at defined locations)														
N0020	(Mechanical set up: Do it before starting program )														
N0030	(Initialize software: First define the parameter values, #, for the drill hole parameters via Subroutine)														
N0040	M98	 P	9052	 (call O9052 and insert the hole values)											
N0050	(Begin:)														
N0060	(Variables representing the hole parameters follows:)														
N0070	#9000	=	100	(Total # of holes described below)											
N0080	#9001	=	101	(Extra addon, non-peck drill depth)											
N0090	#9002	=	102	(Z UP traversed over fixtures)											
N0100	#9003	=	103	( Spindle Speed, drilling)											
N0110	#9101	=	110	(X position)											
N0120	#9201	=	210	(Y position)											
N0130	#9301	=	310	(Z peck drilling depth max position)											
N0140	#9401	=	410	(R retract depth position)											
N0150	#9501	=	510	(L=1 # repeat cycles of this canned cycle )											
N0160	#9601	=	610	(Q peck increment)											
N0170	#9701	=	710	(F drilling feed rate)											
N0180	M3	S	##9003		(set speed and turn on CW)										
N0190	G70	G94			(Inch units, Feed rate per minute)										
N0200	G90				(Absolute position, initial Z=0 at work surface as set up)										
N0210	G1	Z	##9002	F	5	(Moderately move up, if needed, above all fixtures)									
N0220	G98	F	5	(After each hole, Return to the initial z position used just before the canned cycle)											
N0230	M98	P	9051	Q	##9000	(Call drilling subroutine P=O9051 and do it Q=? Times, 12?)									
N0240	G98	F	5	(After each hole, Return to the initial z position used just before the canned cycle)											
N0250	G1	Z	##9002	F	5	(raise tool to clear all clamps)									
N0260	G1	X	0	Y	1	F	15	(Return tool to [park position near origin)							
N0270	M5	(Stop Spindle rotation)													
N0280	M2	(End of main program)													
O9051	(Drilling subroutine   Set up the drill hole data, by incrementing the variable name by 1 each loop)														
N0300	#9101	=	[#9101+1]		(X hole location variable)										
N0310	#9201	=	[#9201+1]		(Y hole location variable)										
N0320	#9301	=	[#9301+1]		(Z depth of hole location variable)										
N0330	#9401	=	[#9401+1]		(retract position after each peck)										
N0340	#9501	=	[#9501+1]		(# peck cycles)										
N0350	#9601	=	[#9601+1]		(peck increment size for each hole)										
N0360	#9701	=	[#9701+1]		(Feed rate for each hole)										
N0370	()														
N0380	G1	Z	##9002	F	5	(Moderately move up, if needed, above all fixtures)									
N0390	G1	X	##9101	Y	##9201	F	10	S	##9003	(Preliminary quick positioning to the hole location, spindle speed rpm)					
N0400	G1	Z	[##9401+.25]	F	5			(Moderately move down to near work)							
N0410	G94	F	##9701		(Set the drilling Feed mode and Feed rate)										
N0420	G4	P	1.5		(Dwell: allow spindle speed stability)										
N0430	G83	X	##9101	Y	##9201	Z	##9301	R	##9401	L	##9501	Q	##9601	(Peck drill)	
N0440	(G81	X	##9101	Y	##9201	Z	[##9301+##9001]	R	##9401				removed Non-Peck, Drill deeper)		
N0450	G1	Z	##9002	F	5		(Moderatly move up, if needed, above all fixtures)								
N0460	M99				(return from Drilling routine)										
N0470															
N0480	()														
O9052	(Subroutine:		UBL-21		hole data follows: )										
N0500	#1	00	=	12	(Total # of holes described below)										
N0510	#1	01	=	0	(Extra addon, non-peck drill depth)										
N0520	#1	02	=	2	(Z UP traversed over fixtures)										
N0530	#1	03	=	800	( Spindle Speed, drilling)										
N0540	#1	11	=	0	(x-center ref hole, 30in)										
N0550	#2	11	=	-2.0833	(y-center ref hole, 30in)										
N0560	#3	11	=	-0.55	(Z-hole peck drill depth)										
N0570	#4	11	=	0.05	(R withdraw position= initial and final position)										
N0580	#5	11	=	1	(L # repeats)										
N0590	#6	11	=	0.04	(Q peck increment. # pecks = z/Q)										
N0600	#7	11	=	1	(F peck feed rate= returned default feed rate)										
N0610	#1	12	=	-2	(x-extra ref hole )										
N0620	#2	12	=	-2.0833	(y-extra ref hole)										
N0630	#3	12	=	-0.55	(Z-hole peck drill depth)										
N0640	#4	12	=	0.05	(R withdraw position= initial and final position)										
N0650	#5	12	=	1	(L # repeats)										
N0660	#6	12	=	0.04	(Q peck increment. # pecks = z/Q)										
N0670	#7	12	=	1	(F peck feed rate= returned default feed rate)										
N0680	#1	13	=	-7.914	(X-BASE hole position)										
N0690	#2	13	=	-6.135	 (Y-BASE hole position)										
N0700	#3	13	=	-0.55	(Z-hole peck drill depth)										
N0710	#4	13	=	0.05	(R withdraw position= initial and final position)										
N0720	#5	13	=	1	(L # repeats)										
N0730	#6	13	=	0.04	(Q peck increment. # pecks = z/Q)										
N0740	#7	13	=	1	(F peck feed rate= returned default feed rate)										
N0750	#1	14	=	-7.281	 (X-MILL hole position)										
N0760	#2	14	=	-4.781	(Y-MILL hole position)										
N0770	#3	14	=	-0.55	(Z-hole peck drill depth)										
N0780	#4	14	=	0.05	(R withdraw position= initial and final position)										
N0790	#5	14	=	1	(L # repeats)										
N0800	#6	14	=	0.04	(Q peck increment. # pecks = z/Q)										
N0810	#7	14	=	1	(F peck feed rate= returned default feed rate)										
N0820	#1	15	=	-9.675	(X-MILL Caster hole)										
N0830	#2	15	=	-0.825	(Y-MILL Caster hole)										
N0840	#3	15	=	-0.55	(Z-hole peck drill depth)										
N0850	#4	15	=	0.05	(R withdraw position= initial and final position)										
N0860	#5	15	=	1	(L # repeats)										
N0870	#6	15	=	0.04	(Q peck increment. # pecks = z/Q)										
N0880	#7	15	=	1	(F peck feed rate= returned default feed rate)										
N0890	#1	16	=	-9.675	(X-MILL Caster hole)										
N0900	#2	16	=	-3.675	(Y-MILL Caster hole)										
N0910	#3	16	=	-0.55	(Z-hole peck drill depth)										
N0920	#4	16	=	0.05	(R withdraw position= initial and final position)										
N0930	#5	16	=	1	(L # repeats)										
N0940	#6	16	=	0.04	(Q peck increment. # pecks = z/Q)										
N0950	#7	16	=	1	(F peck feed rate= returned default feed rate)										
N0960	#1	17	=	-6.325	(X-MILL Caster hole)										
N0970	#2	17	=	-0.825	(Y-MILL Caster hole)										
N0980	#3	17	=	-0.55	(Z-hole peck drill depth)										
N0990	#4	17	=	0.05	(R withdraw position= initial and final position)										
N1000	#5	17	=	1	(L # repeats)										
N1010	#6	17	=	0.04	(Q peck increment. # pecks = z/Q)										
N1020	#7	17	=	1	(F peck feed rate= returned default feed rate)										
N1030	#1	18	=	-6.325	(X-MILL Caster hole)										
N1040	#2	18	=	-3.675	(Y-MILL Caster hole)										
N1050	#3	18	=	-0.55	(Z-hole peck drill depth)										
N1060	#4	18	=	0.05	(R withdraw position= initial and final position)										
N1070	#5	18	=	1	(L # repeats)										
N1080	#6	18	=	0.04	(Q peck increment. # pecks = z/Q)										
N1090	#7	18	=	1	(F peck feed rate= returned default feed rate)										
N1100	#1	19	=	-9.675	(X-BASE Caster hole)										
N1110	#2	19	=	-1.95	(Y-BASE Caster hole)										
N1120	#3	19	=	-0.55	(Z-hole peck drill depth)										
N1130	#4	19	=	0.05	(R withdraw position= initial and final position)										
N1140	#5	19	=	1	(L # repeats)										
N1150	#6	19	=	0.04	(Q peck increment. # pecks = z/Q)										
N1160	#7	19	=	1	(F peck feed rate= returned default feed rate)										
N1170	#1	20	=	-9.675	(X-BASE Caster hole)										
N1180	#2	20	=	-4.8	(Y-BASE Caster hole)										
N1190	#3	20	=	-0.55	(Z-hole peck drill depth)										
N1200	#4	20	=	0.05	(R withdraw position= initial and final position)										
N1210	#5	20	=	1	(L # repeats)										
N1220	#6	20	=	0.04	(Q peck increment. # pecks = z/Q)										
N1230	#7	20	=	1	(F peck feed rate= returned default feed rate)										
N1240	#1	21	=	-6.325	(X-BASE Caster hole)										
N1250	#2	21	=	-1.95	(Y-BASE Caster hole)										
N1260	#3	21	=	-0.55	(Z-hole peck drill depth)										
N1270	#4	21	=	0.05	(R withdraw position= initial and final position)										
N1280	#5	21	=	1	(L # repeats)										
N1290	#6	21	=	0.04	(Q peck increment. # pecks = z/Q)										
N1300	#7	21	=	1	(F peck feed rate= returned default feed rate)										
N1310	#1	22	=	-6.325	(X-BASE Caster hole)										
N1320	#2	22	=	-4.8	(Y-BASE Caster hole)										
N1330	#3	22	=	-0.55	(Z-hole peck drill depth)										
N1340	#4	22	=	0.05	(R withdraw position= initial and final position)										
N1350	#5	22	=	1	(L # repeats)										
N1360	#6	22	=	0.04	(Q peck increment. # pecks = z/Q)										
N1370	#7	22	=	1	(F peck feed rate= returned default feed rate)										
N1380	M99				(Return)										
N1390															
N1400	(Comments and Description starts here)														
N1410		 (Purpose: Drill holes in MILL dolly plates)													
N1420		 (Set up: Home the stages to get the machine origin set up)													
N1430		 (Attach large work piece: center and at least one end can be reached)													
N1440		 (Use edge spinner: work edge parallel to x-motion or obtain mounting angle)													
N1450		 (Make center-edge reference x-y origin, z=0 at 0.2" above peak work. For 30" plate this is 15" from the end)													
N1460		 (This is origin using Mach3 setup tables.  Z=0 position to be defined for each tool used.)													
N1470		 (Any parallel rotation corrections are about this center edge origin.)													
N1480		 (During motion tool tip must clear all clamps and posts.)													
N1490		 (Make hole reference at x=0, y=-1.75" for 30" plate, and at y=-2.1470" for 21" plate, both to match base edge center)													
N1500		 (Define hole locations as values, ie #0200=-1.75 relative to origin, Caster holes relative to caster center)													
N1510		 (Note: the short length of caster holes will be defined along the x axis of the 30" plate and rotated by 90 degrees)													
N1520		 (for the 21" plate i.e. the long length of the caster hole are length, 21" dimension, of the short plate.)													
N1530		 (Note:  Insert the M0, stop, or M6, tool change, command to pause the program --M6 must be enabled in Mach3 setup)													
N1540		 ()													
N1550		 (Setup hole locations are values and caster center locations to be used as temp origin offsets)													
N1560		 (Set up caster hole xy locations relative to the caster center)													
N1570		 (Steps:After alignment of the work and origin definition, make reference 3-5/16" reference hole at center area)													
N1580		 (Make all other drill holes via #7 drill bit for tapping, after center drilling)													
N1590		 (For the 30" part repeat drilling holes with 5/16")													
N1600		 (For the 21" part do not drill to 5/16)													
N1610		 (Short program after bit change to drill out the big bolt holes)													
N1620		 ()													
N1630		 (Programing Steps:)													
N1640		 (Define 12  # values, x, y, z, R, L, Q to locate the holes for each plate, each corner)													
N1650		 (notation: )													
N1660															
N1670															
N1680															
N1690															
N1700															
